<%@page import="com.qf.myschool.vo.LoginUserVo"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<h2>${requestScope.mess }</h2>
		
	<c:choose>
		<c:when test="${sessionScope.stu==null }">
			<!-- 没有登录,直接进入首页 -->
			<h1>你还没有登录,3秒后跳转到登录页面</h1>
			<meta http-equiv="refresh" content="3;url=login.jsp"/>
		</c:when>
		<c:when test="${sessionScope.stu.role=='student' }">
			<h1>学生后台首页</h1>
			<h1><a href="modifyPwd.jsp">修改密码</a></h1>
			<h1><a href="CommonServlet?method=getStudentByName">修改用户信息</a></h1>
			<h1><a href="StudentServlet?method=exit">注销</a></h1>
		</c:when>
		<c:when test="${sessionScope.stu.role=='teacher' }">
			<h1>老师后台首页</h1>
			<h1><a href="modifyPwd.jsp">修改密码</a></h1>
			<h1><a href="TeacherServlet?method=allStudent">管理学生</a></h1>
		</c:when>
	</c:choose>
</body>
</html>